//
//  AppEnv.swift
//  YangFoundation
//
//  Created by yuyang on 2021/12/21.
//

import UIKit

/// 判断APP环境的类
public struct AppEnv {

    public enum AppEnvType {
        case Debug
        case AdHoc
        case Release
    }

    /// 当前环境
    public static var currentEnv: AppEnvType {
        #if DEBUG
            return .Debug
        #elseif ADHOC
            return .AdHoc
        #else
            return .Release
        #endif
    }
    
    
    /// 当前是否是Debug环境
    /// - Returns: Bool
    public static func isDebugEnv() -> Bool {
        return currentEnv == .Debug
    }
    
    /// 当前是否是Release环境
    /// - Returns: Bool
    public static func isReleaseEnv() -> Bool {
        return currentEnv == .Release
    }
}

